<template>

  <div>
    <p>Has published books:</p>

    <div>title:<input v-model="myTitle" /></div>

    <div>number:{{ number }}</div>


    <span>Fallthrough attribute: {{ attrs }}</span>
  
  
  </div>
  
  </template>

<script setup lang="ts">
import { title } from "process"
import { onUpdated, ref ,useAttrs,watch} from "vue"


   const attrs = useAttrs()
   console.log(111,attrs)


   const props = defineProps({
    title: String,
    number: Number
  })
  
  const myTitle = ref(props.title)

  watch(()=>props.title,(newValue)=>{
    myTitle.value = newValue
  })

  onUpdated(()=>{
    console.log('child updatessss')
  })


</script>